<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"	              
      xmlns:t="http://myfaces.apache.org/tomahawk">
      
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<title>Details Ticket</title>
	
	<link rel="stylesheet" type="text/css" href="style/detailsUser.css" />
	
</head>

<body>
       <f:view>
           <t:inputHidden value="#{user.isSignedAsAdmin}" /> 
           <h:form id="Response">
           
	           <p align="right"><t:commandLink value="Sign Out" action="#{user.signOut}"></t:commandLink></p>
			   <p align="right"><t:commandLink value="Back" action="backDetailsAdmin"></t:commandLink></p>

		        <h1><t:outputText value ="#{messages.detailsAdminMessage}"/></h1>
		        <center>
			        <hr />
			      			
			  		<t:panelGroup >
						<t:panelGrid columns="2" style="color:green;">
				  	
				  			<t:outputLabel styleClass="detailClassLeft" for = "user" value = "User: " />
							<t:outputText styleClass="detailClassCenter" id = "user" value = "#{selectedTicket.ticket.userName}"/>
							
							<t:outputLabel styleClass="detailClassLeft" for = "date" value = "Date: " />
							<t:outputText styleClass="detailClassCenter" id = "date" value = "#{selectedTicket.ticket.startTime}"/>
			
							<t:outputLabel styleClass="detailClassLeft" for = "interval" value = "Interval: " />
							<t:outputText styleClass="detailClassCenter" id = "interval" value = "#{selectedTicket.interval}"/>
			
							<t:outputLabel styleClass="detailClassLeft" for = "description" value = "Description: " />
							<t:inputTextarea id = "description" value = "#{selectedTicket.ticket.description}" disabled = "true"/>
			
							<t:outputLabel styleClass="detailClassLeft" for = "status" value = "Status: " style = "#{selectedTicket.hasResponse}" />
							<t:outputText styleClass="detailClassCenter" id = "status" value = "#{selectedTicket.ticket.statusString}" style = "#{selectedTicket.hasResponse}"/>
							<t:outputLabel styleClass="detailClassLeft" for = "Status" value = "Status: " style = "#{selectedTicket.hasNoResponse}" />
							<t:selectOneRadio styleClass="detailClassCenter" id = "Status" value="#{selectedTicket.statusS}" style = "#{selectedTicket.hasNoResponse}" required = "false" >
					   			<f:selectItem itemValue="accepted" itemLabel="Approve" />
					   			<f:selectItem itemValue="rejected" itemLabel="Reject" />
					   			<f:selectItem itemValue="more details" itemLabel="More Details" />
				   			</t:selectOneRadio>
				   			
			
							<t:outputLabel styleClass="detailClassLeft" for = "rejected" value = "Message: " style = "#{selectedTicket.hasNoResponse}"/>
							<t:inputTextarea styleClass="detailClassCenter" id = "rejected" value = "#{selectedTicket.ticket.rejected}" style = "#{selectedTicket.hasNoResponse}"/>
			
						<p>
							<t:commandButton value = "Send" action = "#{selectedTicket.sendResponse}" style = "#{selectedTicket.hasNoResponse}"/>
						</p>
		                   <h:messages style="color:red;margin:8px;"/>
				  	
						</t:panelGrid>
				      </t:panelGroup> 
		          </center>
	          </h:form>
          </f:view>
</body>
       


           
           
				
			
</html>